﻿using System;

namespace _01_HelloWorld
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            var bitCount = sizeof(int);
            Console.WriteLine("本平台上int的字节数为：{0}", bitCount);

            dynamic aaa = 20;

            string aaa2 = "abc";
            Console.WriteLine("aaa2：{0}", aaa2);

            // 测试类型转换
            string numStr = "123";
            int num = Convert.ToInt32(numStr);
            Console.WriteLine("转换后的num是：{0}", num);

            /*
            Console.WriteLine("一个转换错误的例子，会抛出异常");
            string randomStr = "abc123";
            int num2 = Convert.ToInt32(randomStr);
            Console.WriteLine("转换后的num2是：{0}", num2);
            */

            string name = Console.ReadLine();
            Console.WriteLine("你好，{0}", name);



            Console.ReadKey();
            
            
        }
    }
}
